#ifndef RING_INCLUDED
#define RING_INCLUDED

#define T Ring_T
typedef struct T *T;

T     Ring_new();
T     Ring_ring(void *x, ...);
void  Ring_free(T *ring);
int   Ring_length(T ring);
void* Ring_get(T ring, int i);
void* Ring_put(T ring, int i, void *x);
void* Ring_add(T ring, int pos, void *x);
void* Ring_addlo(T ring, void *x);
void* Ring_addhi(T ring, void *x);
void* Ring_remove(T ring, int i);
void* Ring_remlo(T ring);
void* Ring_remhi(T ring);
void  Ring_rotate(T ring, int n);

#undef T

#endif
